generic
   type communaute_model is private;
   with function creer return communaute_model is <>;

   with function inscrire(C0:communaute_model; I1:individu) return communaute_model is <>;
   with function est_inscrit(C0:communaute_model;I1:individu) return boolean is <>;
   with function nombre_inscrit(C0:communaute_model) return natural is <>;
   with function ieme_inscrit(C0:communaute_model;I:natural) return individu is <>;
   with function bloquer (C0:communaute_model; I1,I2: individu) return communaute_model is <>;
   with function debloquer(C0:communaute_model;I1,I2: individu) return communaute_model is <>;
   with function est_bloque(C0:communaute_model; I1,I2:individu) return boolean is <>;

   with function ajouter_cercle(C0:communaute_model; I1: individu; C1:cercle) return communaute_model is <>;
   with function retirer_cercle(C0:communaute_model; I1: individu; C1:cercle) return communaute_model is <>;
   with function est_cercle_de(C0:communaute_model;I1:individu;C1:cercle) return boolean is <>;
   with function nombre_cercle_de(C0:communaute_model;I1:individu) return natural is <>;
   with function ieme_cercle(C0:communaute_model;I1:individu;I:natural) return cercle is <>;

   with function ajouter_membre(C0:communaute_model; I1: individu; C1:cercle; I2: individu) return communaute_model is <>;
   with function retirer_membre(C0:communaute_model; I1: individu; C1:cercle; I2: individu) return communaute_model is <>;
   with function nombre_membre_de(C0:communaute_model;I1:individu;C1:cercle)return natural is <>;
   with function ieme_membre(C0:communaute_model;I1:individu;C1:cercle;I:natural)return individu is <>;
   with function est_membre_de(C0:communaute_model;I1:individu;C1:cercle;I2:individu) return boolean is <>;

   with function poster(C0:communaute_model;I1:individu;C1:cercle;t: message) return communaute_model is <>;
   with function commenter(C0: communaute_model; I1:individu; i:Natural; t: message) return communaute_model is <>;
   with function consulter(C0:communaute_model;I1:individu) return Mur is <>;
   with function nombre_post(C0:communaute_model) return Natural is <>;

package communautes.generic_implementation is
   type communaute is new communautes.communaute with private;

   -------------------------------------------------------------------------------------------
   ------------------------------------La communaute------------------------------------------
   -------------------------------------------------------------------------------------------
   function creer return communaute ;

   -------------------------------------------------------------------------------------------
   ---------------------------------Les individus de la communaute----------------------------
   -------------------------------------------------------------------------------------------
   function inscrire(C0:communaute; I1:individu) return communaute ;
   function est_inscrit(C0:communaute;I1:individu) return boolean ;
   function ieme_inscrit(C0:communaute;I:Natural) return individu ;
   function nombre_inscrit(C0:communaute) return natural;
   function bloquer (C0:communaute; I1,I2: individu) return communaute ;
   function debloquer(C0:communaute;I1,I2: individu) return communaute ;
   function est_bloque(C0:communaute; I1,I2:individu) return boolean ;

   -------------------------------------------------------------------------------------------
   -----------------------------------Les cercles d'un individu-------------------------------
   -------------------------------------------------------------------------------------------
   function ajouter_cercle(C0:communaute; I1: individu; C1:cercle) return communaute ;
   function retirer_cercle(C0:communaute; I1: individu; C1:cercle) return communaute ;
   function ieme_cercle(C0:communaute;I1:individu;I:natural) return cercle ;
   function est_cercle_de(C0:communaute;I1:individu;C1:cercle) return boolean ;
   function nombre_cercle_de(C0:communaute;I1:individu) return Natural;


   -------------------------------------------------------------------------------------------
   ----------------------------------Les membres d'un cercle----------------------------------
   -------------------------------------------------------------------------------------------
   function ajouter_membre(C0:communaute; I1: individu; C1:cercle; I2: individu) return communaute ;
   function retirer_membre(C0:communaute; I1: individu; C1:cercle; I2: individu) return communaute ;
   function nombre_membre_de(C0:communaute;I1:individu;C1:cercle)return natural ;
   function est_membre_de(C0:communaute;I1:individu;C1:cercle;I2:individu) return boolean ;
   function ieme_membre(C0:communaute;I1:individu;C1:cercle;I:natural)return individu ;


   -------------------------------------------------------------------------------------------
   --------------------------------Les Posts et commentaires----------------------------------
   -------------------------------------------------------------------------------------------
   function poster(C0:communaute;I1:individu;C1:cercle;t: message) return communaute ;
   function commenter(C0: communaute; I1:individu; i:Natural; t: message) return communaute ;
   function nombre_post(C0:communaute) return Natural;
   function consulter(C0:communaute;I1:individu) return Mur ;

private
   type communaute is new communautes.communaute with record Content :communaute_model; end record;
end communautes.generic_implementation;
